<?php
  $song = str_replace(".mp3", "", "$_GET[song]");
  $song = str_replace('_', ' ', $song);
  include('./init.php');
  $res = mysql_query("SELECT id_file,file_name,file_title FROM bj_audio WHERE file_title='". mysql_real_escape_string($_GET['song']) . "'");
  if ($res !== FALSE && mysql_num_rows($res)) {
    $lin = mysql_fetch_array($res);
    mysql_query("UPDATE traffic_stats SET item_views=item_views+1 WHERE item_id='{$lin[0]}'") or die(mysql_error());
  } else {
    header('Location: ./notfound.html');
    exit;
  }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> Theme Song </title>
<meta property="og:title" content="<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> Theme Song" />
<meta property="og:type" content="song" />
<meta name="description" content="I love this theme song. Listen to more theme music and songs from 25,893 different television shows at TelevisionTunes.com" />
<meta name="keywords" content="<?php echo str_replace('.mp3', '', $lin[1]);?> theme song, <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> theme music, <?php echo str_replace('.mp3', '', $lin[1]); ?>s music, TV Theme songs, television songs, tv tunes"/>
<meta property="og:site_name" content="TelevisionTunes.com"/>
<meta property="og:type" content="song" />
<meta property="og:image" content="http://www.televisiontunes.com/images/logo-tiny2.jpg"/>
<meta property="fb:app_id" content="191531760901423" />
<meta property="og:url" content="<?php echo utils::create_href($lin['file_title']); ?>" />


<link rel="stylesheet" href="css/css.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/email.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS latest songs" href="http://www.televisiontunes.com/rss.php" />
<script language="JavaScript" type="text/javascript" src="js/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="js/functions.js"></script>

<style type="text/css">
<!--
.style4 {font-size: 12px}
.style5 {
	font-size: 1.3em;
	font-weight: bold;
}
a img { border:0px;}
a.download { color:white; }
a:hover.download { color:black; }
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
  
  
<link href="http://www.jplayer.org/latest/skin/blue.monday/jplayer.blue.monday.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery.jplayer.min.js"></script>
<script type="text/javascript">
//<![CDATA[  
$(document).ready(function(){

	$("#jquery_jplayer_1").jPlayer({
		ready: function () {
			$(this).jPlayer("setMedia", {
				mp3: "/themesongs/<?php echo $lin[1]; ?>"
			}).jPlayer("play"); // Attempts to Auto-Play the media
		},
		swfPath: "/js",
		supplied: "mp3",
		wmode: "window",
		smoothPlayBar: true,
		keyEnabled: true
	});
});
//]]>
</script>
  
</head>

<body>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<div id="fb-root"></div> 
<script>
FB.init({appId: '191531760901423', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('auth.login', function(response) {
        window.location.reload();
});
</script>
<?php include('blocks/google-analytics.php'); ?>
<div id="wrap">
	<div id="header">
		<?php include('blocks/header.php'); ?>
 		<ul>
			<li><a href="index.php" class="active">Home</a></li>
			<!--<li><a href="browse.php">Index</a></li>-->
			<li><a href="game.php">Game</a></li>
			<li><a href="links.php">Links</a></li>
			<li><a href="search.php">Search</a></li>
			<li><a href="missing-songs.php">Wanted</a></li>
			<li><a href="copyright.php">Legal</a></li>
			<li><a href="contact.php">Contact</a></li>
		</ul>
	</div>

	<div id="content-wrap">
				<div style=""><a href="http://www.televisiontunes.com/donate.php"><img src="images/tvtunes-header-donations-bar.jpg" width="899px" border="0"></a></div>
		<div id="main">
			<table border="0" width="100%" align="center">
				<tr><td height="5"></td></tr>
				<tr>
					<td>
						<a href="<?php echo ABS_URL ?>index.php"><img src="images/TVGuy-small.png" alt="Television Tunes" border="0" /></a>
					</td>
					<td>
						<?php include('blocks/index.php'); ?>
					</td>
				</tr>
			</table>

			<table border="0" width="100%" align="center">
				<tr>
					<td width="52%" align="center" valign="top">
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td style="color:#333333; font-size:17px; font-weight:600; padding-right:15px;">
									<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> Theme Song
								</td>
							</tr>
							<tr><td height="20px"></td></tr>								
							<tr>
								<td class="fb_like" align="center">									
																		<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(utils::create_href($lin['file_title'])); ?>&amp;layout=button_count&amp;show_faces=true&amp;width=80&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>

									<a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

									<g:plusone></g:plusone>
								</td>
							</tr>	
							<tr>
								<td height="20px">
									<div align="center">
                  	<!--<a href="#" class="get_song">Get this song as a Ringtone</a>-->
                    <?php
										if ($_GET['song'] == 'Andy_Griffith_Show' ||
										$_GET['song'] == 'Dick_Van_Dyke_Show' ||
										$_GET['song'] == 'The_Dick_Van_Dyke_Show' ||
										$_GET['song'] == 'Gomer_Pyle_USMC' ||
										$_GET['song'] == 'I_Spy' ||
										$_GET['song'] == 'Mod_Squad'
										) {
										?>
									</div>
								  <div style="text-align: left; font-size: .85em;"> &nbsp;&nbsp;&nbsp;To get this ringtone, text 'clstv' (as in Classic TV!) to 32852 to get these classic tv ringtones on any T Mobile, AT&amp;T/Cingular, Verizon or Sprint wireless device. <br />
  									&nbsp;&nbsp;&nbsp;When you send the text, you'll get a text back taking you to a download page where you can select which ringtone to download. <br />
  									&nbsp;&nbsp;&nbsp;Or log into your carrier's website, go to the Ringtones page, and search for &quot;<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>&quot; 
  								</div>
                  <div align="center">
                  	<?php } else { ?>
                    <img src="images/phone.png" alt="" width="16" height="17" />&nbsp;&nbsp;<a href="http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=TETUros&amp;artist=theme&amp;song=<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>" class="" onclick="javascript: pageTracker._trackPageview('/outgoing/Ringtones-space.com');" target="_blank"><span class="style4">Send <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?><br /> to your Cell as a Ringtone</span></a> 
                    
                 <span class="style4">&nbsp;&nbsp;<img src="images/phone.png" alt="" width="16" height="17" />
                    <?php } ?>
									</div>
								</td>
						  </tr> 	
							<tr>
								<td>
									
		<div id="jquery_jplayer_1" class="jp-jplayer"></div>

		<div id="jp_container_1" class="jp-audio">
			<div class="jp-type-single">
				<div class="jp-gui jp-interface">
					<ul class="jp-controls">
						<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
						<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
						<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
						<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
						<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
						<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
					</ul>
					<div class="jp-progress">
						<div class="jp-seek-bar">
							<div class="jp-play-bar"></div>
						</div>
					</div>
					<div class="jp-volume-bar">
						<div class="jp-volume-bar-value"></div>
					</div>
					<div class="jp-time-holder">
						<div class="jp-current-time"></div>
						<div class="jp-duration"></div>

						<ul class="jp-toggles">
							<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
							<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
						</ul>
					</div>
				</div>
				<div class="jp-title">
					<ul>
						<li><?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?></li> 
					</ul>
				</div>
				<div class="jp-no-solution">
					<span>Update Required</span>
					To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
				</div>
			</div>
		</div>																
								
							  </td>
							</tr>
							<tr><td height="5px"></td></tr>
					  						
							<tr>
								<td align="center">
									<table cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td align="right" width="33%">
												<a class="download" href="download.php?f=<?php echo urlencode($_GET['song']); ?>" onClick="javascript: pageTracker._trackPageview('/download/<?php echo $song; ?>');"><img src="images/back.png" alt="back" border="0" /> 
												<br />
												Download</a>															
											</td>
											<td align="center" width="33%" valign="top" style="padding-top:15px;">
 
												<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=c9cf4f7f-936d-4bff-8063-3c01d20669ef&amp;type=website&amp;post_services=email%2Cfacebook%2Ctwitter%2Cgbuzz%2Cmyspace%2Cdigg%2Csms%2Cwindows_live%2Cdelicious%2Cstumbleupon%2Creddit%2Cgoogle_bmarks%2Clinkedin%2Cbebo%2Cybuzz%2Cblogger%2Cyahoo_bmarks%2Cmixx%2Ctechnorati%2Cfriendfeed%2Cpropeller%2Cwordpress%2Cnewsvine&amp;button=false"></script>
												<a id="ck_email" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/email.gif" /></a>
												<a id="ck_facebook" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/facebook.gif" /></a>
												<a id="ck_twitter" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/twitter.gif" /></a>
												<a id="ck_sharethis" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/sharethis.gif" />ShareThis</a>																								
												<script type="text/javascript">
													var shared_object = SHARETHIS.addEntry({
													title: document.title,
													url: document.location.href
												});												
												shared_object.attachButton(document.getElementById("ck_sharethis"));
												shared_object.attachChicklet("email", document.getElementById("ck_email"));
												shared_object.attachChicklet("facebook", document.getElementById("ck_facebook"));
												shared_object.attachChicklet("twitter", document.getElementById("ck_twitter"));
												</script>		
														
											</td>
											<td align="left" width="33%">
												<a class="download" href="javascript: history.go(-1)"><img src="images/download.png" alt="Download <?php echo $song; ?> theme song" border="0" />
												<br />
												Back</a>															
											</td>
										</tr> 
										<tr>
											<td colspan="5" valign="top" style="padding-top:5px;" align="center">


											</td>
										</tr>
									</table>
								</td>
							</tr>
													
							<tr>
						    <td height="5">
									<div align="center">
                  	<!--<a href="#" class="get_song">Get this song as a Ringtone</a>-->
                    <?php
										if ($_GET['song'] == 'Andy_Griffith_Show' ||
										$_GET['song'] == 'Dick_Van_Dyke_Show' ||
										$_GET['song'] == 'The_Dick_Van_Dyke_Show' ||
										$_GET['song'] == 'Gomer_Pyle_USMC' ||
										$_GET['song'] == 'I_Spy' ||
										$_GET['song'] == 'Mod_Squad'
										) {
										?>
									</div>
								  <div style="text-align: left; font-size: .85em;">  nbsp;&nbsp;&nbsp;To get this ringtone, text 'clstv' (as in Classic TV!) to 32852 to get these classic tv ringtones on any T Mobile, AT&amp;T/Cingular, Verizon or Sprint wireless device. <br />
  									&nbsp;&nbsp;&nbsp;When you send the text, you'll get a text back taking you to a download page where you can select which ringtone to download. <br />
  									&nbsp;&nbsp;&nbsp;Or log into your carrier's website, go to the Ringtones page, and search for &quot;<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>&quot; 
  								</div>
                  <div align="center">
                  	<?php } else { ?>
                    <img src="images/phone.png" alt="" width="16" height="17" />&nbsp;&nbsp;<a href="http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=TETUros&amp;search=<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>" class="" onclick="javascript: pageTracker._trackPageview('/outgoing/Ringtones-space.com');" target="_blank"><span class="style4">Send <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?><br /> to your Cell as a Ringtone</span></a> <span class="style4">&nbsp;&nbsp;<img src="images/phone.png" alt="" width="16" height="17" />
                    <?php } ?>
									</div>
								</td>
						  </tr>
							<tr>
								<td align="center">
								  <br />
								  <table cellpadding="0" cellspacing="0" border="0"><tr><td style="color:#333333; padding-right:20px;" valign="top">
								  
								</td>
							</tr>
						</table>
								</td>
						  </tr>
							<tr>
								<td height="20">
									<div align="center">
								  	<table width="100%" border="0">
                    	<tr>
                    	</tr>
										</table>
 									</div>
 								</td>
 							</tr>
							<tr></tr>
				  	</table>
				  </td>
					<td width="48%" valign="top" style="padding-left:50px;">
						<div id="emailContainer" style="display: none;"></div>
						<p>
						<strong>Newest Songs </strong><br />
						<select name="lsongs" onchange="document.location.href=this.options[this.selectedIndex].value" style="width:300px;">
						<option>Select a Song</option>
						<?php
							$file_id=$lin[0];
							$res2 = mysql_query("SELECT file_name, file_title FROM bj_audio ORDER BY date_added DESC LIMIT 100");
							if ($res2 !== FALSE && mysql_num_rows($res2)) {
								while($lin2 = mysql_fetch_assoc($res2)) {
									echo '<option value="' . utils::create_href($lin2['file_title']) . '">' . htmlspecialchars(str_replace('.mp3', '', $lin2['file_name'])) . '</option>';
								}
								mysql_free_result($res2);
							}
						?>
						</select>
						</p>
						<br />
						<?php include('blocks/ads_mediumRectangle.php');?>
						<br /><br />
						<div align="">


							
					  </div>
					</td>
				</tr>
			</table>
			<center>
			<?php include('blocks/site-links.php'); ?>

			</center>
	  </div><!-- content-wrap ends here -->
	</div>
	<!-- footer starts here -->
	<div id="footer">
		<?php include('blocks/footer.php'); ?>
	</div>
<!-- footer ends here -->
<!-- wrap ends here -->
</div>
<script type="text/javascript" src="http://cdn.fluidads.co/scripts/fluid/televisiontunes/default" id="FA_pubJS" async defer></script></body>
</html>